package com.artisan.service.admin.impl;

import com.artisan.dao.AddressInfosMapper;
import com.artisan.medium.admin.service.AddressInfoService;
import com.artisan.model.AddressInfos;
import com.artisan.model.AddressInfosExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

/**
 * Created by szw on 2017/7/8.
 */
@Service("addressInfoService")
@Transactional
public class AddressInfoServiceImpl implements AddressInfoService {

	@Autowired
	private AddressInfosMapper addressInfosMapper;

	@Override
	public List<AddressInfos> getAddressInfoByPid(String pid) {
		AddressInfosExample example = new AddressInfosExample();
		AddressInfosExample.Criteria criteria = example.createCriteria();
		criteria.andPidEqualTo(pid);
		return addressInfosMapper.selectByExample(example);
	}
}
